package com.yootoo.bsuser.stream.listener;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;

import com.yootoo.bsuser.config.RabbitConfig;

@Component
@RabbitListener(queues ="ins.order.sts.item.change.operate")
public class InsOrderStsChangeReceiver {

	private final Logger logger = LoggerFactory.getLogger(this.getClass());
	
	@RabbitHandler
	public void insOperate(String content) throws Exception {
		if(StringUtils.isEmpty(content)) {
			throw new Exception("消费不能为空");
		}
		logger.info("保险操作： " + content);
	}
	
}